$(document).ready(function() {
	$.index.init();
});

(function($) {
	$.index = function() {

	};
	$.extend($.index, {
		init : function() {
			// 直接进入收银台
			$('#directPay').click(function() {
				$.index.directPayExperienceType();
			});
			// 搜索bankType直连
			$('#directNetBank').click(function() {
				$.index.directNetBankGateWayExperienceType();
			});
			// 点击银行logo直连
			$('.directNetBank').click(function() {
				$.index.directNetBankSelectExperienceType($(this).attr('id'));
			});
		},
		directPayExperienceType : function() {
			$("#PayExperienceType").val("directPay");
			document.alipayment.submit();
		},
		directNetBankGateWayExperienceType : function() {
			var bankTypeIn = $("#bankTypeIn").val();
			if (bankTypeIn == null||bankTypeIn== "" || bankTypeIn== undefined) {
				return;
			}
			$("#PayExperienceType").val("directNetBank");
			$("#bank_type").val(bankTypeIn);
			document.alipayment.submit();
		},
		directNetBankSelectExperienceType : function(banktype) {
			$("#PayExperienceType").val("directNetBank");
			$("#bank_type").val(banktype);
			document.alipayment.submit();
		},
	});
})(jQuery);
